<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Bookmarks - Create bookmark</title>
<link rel="icon" href="../favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" media="all" href="../css/form.css">
<script type="text/javascript" src="../js/form.js"></script>
</head>

<body>

<p id="author">${f:h(author)}</p>

<form id="aform" action="${f:url('add')}" method="post">

<label>title:</label><br/>
<input type="text" id="t" ${f:text("t")} class="${f:errorClass('t', 'err')}" style="width: 40em;">&nbsp;${f:h(errors.t)}<br/>

<label>url:</label><br/>
<input type="text" id="u" ${f:text("u")} class="${f:errorClass('u', 'err')}" style="width: 40em;">&nbsp;${f:h(errors.u)}<br/>

<label>collection:</label><br/>
<select name="c">
<c:forEach var="e" items="${collections}">
<option ${f:select("c", f:h(e.key))}>${f:h(e.name)}</option>
</c:forEach>
</select><br/>

<label>new collection:</label><br/>
<input type="text" ${f:text("n")} style="width: 40em;"><br/>

<br/>

<input type="submit" name="doAdd"/>
<input type="button" value="Cancel" onclick="javascript: history.back(); return false;"/>

</form>

</body>

</html>
